<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="hmg.vo.BoardVO"%>
<%@ page import="java.util.List"%>
<%-- 
    JSP Name : jspName.jsp
    Description : 설명을 기술합니다.
    author Kim hyung soo
    since 2012. 9. 18.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 9. 18.     Kim hyung soo     최초 생성
--%>
<%
    List<BoardVO> newsList = (List<BoardVO>) request.getAttribute("NewsList");

    if (newsList == null || newsList.size() == 0)
        out.println("                                <dl style=\"text-align:center;\">검색된 게시물이 없습니다.</dl>");
    else {
        for (int idx = 0; idx < newsList.size(); idx++) {
            BoardVO news = newsList.get(idx);

            if (idx + 1 < newsList.size())
                out.println("                                <dl>");
            else
                out.println("                                <dl class=\"last\">");
%>
                                    <dt>
<%          if (news.getBoardID() == 1) { %>
                                        <%= news.getCompName() %>
<%          
            }
            else {
%>
                                        <span class="company"><%= news.getListName() %></span>
<%          } %>
                                        <span class="date"><%= news.getRegDate() %></span><br />
<%          if (news.getBoardID() == 1) { %>
                                            <a href="/hmg/web/kor/grn/nws/NewsView.do?listID=<%= news.getListID() %>&listType=0&compType=0&listFlag=1">
<%
            }
            else if (news.getBoardID() == 2) {
%>
                                            <a href="/hmg/web/kor/grn/mtl/MotorsLineView.do?listID=<%= news.getListID() %>&listType=0">
<%          } %>
                                        <span class="title" style="width:480px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"><%= news.getTitle() %></span></a>
                                    </dt>
                                    <dd class="text">
<%          if (news.getBoardID() == 1) { %>
                                        <a href="/hmg/web/kor/grn/nws/NewsView.do?listID=<%= news.getListID() %>&listType=0&compType=0&listFlag=1">
<%
            }
            else if (news.getBoardID() == 2) {
%>
                                        <a href="/hmg/web/kor/grn/mtl/MotorsLineView.do?listID=<%= news.getListID() %>&listType=0">
<%          } %>
                                        <%= news.getWebContent() %></a>
                                    </dd>
                                    <dd class="img">
<%          if (news.getBoardID() == 1) { %>
                                        <a href="/hmg/web/kor/grn/nws/NewsView.do?listID=<%= news.getListID() %>&listType=0&compType=0&listFlag=1">
<%
            }
            else if (news.getBoardID() == 2) {
%>
                                        <a href="/hmg/web/kor/grn/mtl/MotorsLineView.do?listID=<%= news.getListID() %>&listType=0">
<%          } %>
                                        <img src="<%= news.getThumbnailImage() %>" width="134" height="81" border="0" alt="list" /></a>
                                    </dd>
                                </dl>
<%
        }
    }
%>